package com.sdx.console.content.service;

import com.ibeetl.admin.core.service.BaseService;
import com.ibeetl.admin.core.util.PlatformException;
import com.sdx.console.content.dao.ResContentColumnDao;
import com.sdx.console.content.entity.ResContentColumn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class ResContentColumnService  extends BaseService<ResContentColumn> {
    @Resource
    ResContentColumnDao resContentColumnDao;

    public int[] updateByIdBatch(List<?> list){
        return  this.getSqlManager().updateByIdBatch(list);
    }

    public void insertBatch(Class clazz,List<?> list){
        this.getSqlManager().insertBatch(ResContentColumn.class,list);
    }

    public void batchDelResContentColumnBycontentIds(List<String> ids){
        try {
            resContentColumnDao.batchDelResContentColumnBycontentIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除ResContentColumn失败", e);
        }
    }

}
